package crm.entity;

import java.math.BigDecimal;

/**
 * CustValueId entity. @author MyEclipse Persistence Tools
 */

public class CustValueId implements java.io.Serializable {

	// Fields

	private CustCustomer custCustomer;
	private BigDecimal custValcount;
	private BigDecimal custValtotla;
	private String custName;

	// Constructors

	/** default constructor */
	public CustValueId() {
	}

	/** minimal constructor */
	public CustValueId(BigDecimal custValcount, BigDecimal custValtotla,
			String custName) {
		this.custValcount = custValcount;
		this.custValtotla = custValtotla;
		this.custName = custName;
	}

	/** full constructor */
	public CustValueId(CustCustomer custCustomer, BigDecimal custValcount,
			BigDecimal custValtotla, String custName) {
		this.custCustomer = custCustomer;
		this.custValcount = custValcount;
		this.custValtotla = custValtotla;
		this.custName = custName;
	}

	// Property accessors

	public CustCustomer getCustCustomer() {
		return this.custCustomer;
	}

	public void setCustCustomer(CustCustomer custCustomer) {
		this.custCustomer = custCustomer;
	}

	public BigDecimal getCustValcount() {
		return this.custValcount;
	}

	public void setCustValcount(BigDecimal custValcount) {
		this.custValcount = custValcount;
	}

	public BigDecimal getCustValtotla() {
		return this.custValtotla;
	}

	public void setCustValtotla(BigDecimal custValtotla) {
		this.custValtotla = custValtotla;
	}

	public String getCustName() {
		return this.custName;
	}

	public void setCustName(String custName) {
		this.custName = custName;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof CustValueId))
			return false;
		CustValueId castOther = (CustValueId) other;

		return ((this.getCustCustomer() == castOther.getCustCustomer()) || (this
				.getCustCustomer() != null
				&& castOther.getCustCustomer() != null && this
				.getCustCustomer().equals(castOther.getCustCustomer())))
				&& ((this.getCustValcount() == castOther.getCustValcount()) || (this
						.getCustValcount() != null
						&& castOther.getCustValcount() != null && this
						.getCustValcount().equals(castOther.getCustValcount())))
				&& ((this.getCustValtotla() == castOther.getCustValtotla()) || (this
						.getCustValtotla() != null
						&& castOther.getCustValtotla() != null && this
						.getCustValtotla().equals(castOther.getCustValtotla())))
				&& ((this.getCustName() == castOther.getCustName()) || (this
						.getCustName() != null
						&& castOther.getCustName() != null && this
						.getCustName().equals(castOther.getCustName())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getCustCustomer() == null ? 0 : this.getCustCustomer()
						.hashCode());
		result = 37
				* result
				+ (getCustValcount() == null ? 0 : this.getCustValcount()
						.hashCode());
		result = 37
				* result
				+ (getCustValtotla() == null ? 0 : this.getCustValtotla()
						.hashCode());
		result = 37 * result
				+ (getCustName() == null ? 0 : this.getCustName().hashCode());
		return result;
	}

}